package com.trkj.focusonzhuzhou;

import android.content.Intent;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.TextView;

public class GuidePage4Fragment extends Fragment {

	private FrameLayout root;
	private TextView tvComeMain;
	
	@Override
	public View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState) {
		if(root == null){
			root = (FrameLayout) inflater.
					inflate(R.layout.guide_page_4, null);
			tvComeMain = (TextView) root.
					findViewById(R.id.tv_come_in_main);
			
			tvComeMain.setOnClickListener(new OnClickListener() {
				@Override
				public void onClick(View arg0) {
					Intent intent = new Intent(getActivity() ,
							MainActivity.class);
					startActivity(intent);
				}
			});
		}
		
		ViewGroup parent = (ViewGroup) root.getParent();
		if(parent != null){
			parent.removeAllViews();
		}
		
		return root;
	}
}
